import javax.microedition.lcdui.*;

public class az extends ba
{

    public u c;
    public String d;
    public int e;

    public az(o o1, u u1, String s)
    {
        super(o1);
        e = -1;
        c = u1;
        d = s;
    }

    public String toString()
    {
        return d;
    }

    public void a(String s)
    {
        d = s;
        e = -1;
    }

    public final void a(u u1)
    {
        c = u1;
        e = -1;
    }

    public final int g()
    {
        int i = super.I.j.stringWidth(d);
        if(c != null)
            i += super.I.v + c.b();
        return i;
    }

    public final int g(int i)
    {
        int j = super.I.j.getHeight();
        if(c != null)
            j = Math.max(j, c.c());
        return j;
    }

    public int a(int i, int j, int k, int l)
    {
        e = -1;
        return g(0);
    }

    public void a(Graphics g1, bh bh1, o o1, int i, int j)
    {
        if(c != null)
        {
            Image image;
            int k = (image = c.a).getWidth() + o1.v;
            if(o1.w == 0)
            {
                g1.drawImage(image, 0, j / 2, 6);
                g1.translate(k, 0);
            } else
            {
                g1.drawImage(image, i, j / 2, 10);
            }
            i -= k;
        }
        if(d == null)
        {
            return;
        } else
        {
            g1.setColor(o1.n);
            g1.setFont(o1.j);
            e = bh.a(g1, d, e, i, j, o1.e, 0, 0);
            return;
        }
    }
}